﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ucIP.ascx.cs" Inherits="IISView.ucStatistics.ucIP" %>

<script type="text/javascript">
<!--
    function OpenWin(ip) {
        window.open('http://www.123cha.com/ip/?q=' + ip)
    }
--> 
</script>

<table id="Search">
    <tr>
        <td>
            <div>
                <b>站点:</b><asp:DropDownList ID="ddlSite" runat="server"></asp:DropDownList>
                <asp:RadioButton ID="rbtnTel" GroupName="stype" Checked="true" Text="电信" runat="server" />
                <asp:RadioButton ID="rbtnUni" GroupName="stype" Checked="false" Text="联通" runat="server" />
            </div>
            <div>
                <b>日期:</b><asp:TextBox ID="tbDate" runat="server" Width="80" OnFocus="new Calendar().show(this);" ></asp:TextBox><input type="button" onclick="new Calendar().show(<%=tbDate.ClientID %>);" class="Calendar" />
            </div>
            <div>
                显示前<asp:TextBox ID="tbTop" runat="server" Text="100" Width="50"></asp:TextBox>条记录
            </div>
            <div>
                <asp:Button ID="btnSearch" runat="server" OnClick="btnSearch_Click" Text="查询" CssClass="btn" />
            </div>
        </td>
    </tr>
</table>
<table id="Result">
    <tr>
        <td align="center">
            <div style="width:95%; text-align:right;">共<asp:Label ID="lblCount" runat="server" Text="0"></asp:Label>条记录</div>
        </td>
    </tr>
    <tr>
        <td>
            <asp:GridView ID="gvResult" runat="server" width="95%" CssClass="gridview" AutoGenerateColumns="false" HeaderStyle-CssClass="Head">
                <HeaderStyle Font-Bold="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Center" Wrap="True" />
                <Columns>
                    <asp:TemplateField HeaderText="客户端IP">
                        <HeaderStyle CssClass="td1" Font-Bold="False" Font-Overline="False" Font-Strikeout="False"
                            Font-Underline="False" HorizontalAlign="Center" Wrap="True" Width="13%" />
                        <ItemTemplate>
                                <a href='#' onclick="OpenWin('<%#Eval("clientip")%>')"><%#Eval("clientip") %></a>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="mycount" HeaderText="访问次数"></asp:BoundField>
                    <asp:BoundField DataField="iparea" HeaderText="国家地区"></asp:BoundField>
                    <asp:BoundField DataField="ipaddress" HeaderText="详细地址"></asp:BoundField>
                </Columns>
            </asp:GridView>
        </td>
    </tr>
</table>